package com.mlz.www.operator;

//自增自减运算符
public class Demo02 {
    public static void main(String[] args) {
        int a = 10;
        ++a; //a = a + 1;
        System.out.println(a);//11

        //混合使用
        int i = 10;
        int j = ++i; //先加后用
        System.out.println(j);//11
        System.out.println(i);//11

        int x = 10;
        int z = x++;//先用后加
        System.out.println(x);//11
        System.out.println(z);//10
    }
}
